#include "editor_brush.h"
#include "editor_main.h"

#include "graphics/graphics_util.h"
#include "script/scripthelper.h"
#include "script/write_lua.h"
#include "font/font_manager.h"
#include "dd/dd_man.h"
#include "util/mmgr.h"		    // Needs to come in early
#include "util/common_macros.h"		// macros
#include "util/log.h"		    // logging
#include "util/timer.h"		    // logging
#include <cassert>

using namespace editor;


void			EditorBrush::RenderHelp()
{
	FontManager::Instance().Print(math::Vec2(0.01f, 0.5f), m_HelpText.c_str());
}

float			EditorBrush::GetScale()
{
	return m_pEditor->GetScale();
}

math::Vec2		EditorBrush::GetOffset()
{
	return m_pEditor->GetOffset();
}
math::Vec2		EditorBrush::GetPos()
{
	return GetOffset()  + ( m_pEditor->GetMousePos() / GetScale()); 
}

GameBase*		EditorBrush::GetGame()
{
	return m_pEditor->GetGame();
}

bool	EditorBrush::ShiftDown()
{
	return GET_KEYBOARD().IsShiftDown();
}

bool	EditorBrush::CtrlDown()
{
	return GET_KEYBOARD().IsCtrlDown();
}
bool	EditorBrush::AltDown()
{
	return GET_KEYBOARD().IsAltDown();
}
